#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <string>
#include <queue>
using namespace std;

template <class _Ty>
struct Less
{
	bool operator()(const _Ty& x, const _Ty& y)
	{
		return x < y;
	}
};

int main()
{
	priority_queue<int> que;
	que.push(3);
	que.push(2);
	que.push(5);
	que.push(4);
	que.push(1);

	while (!que.empty())
	{
		printf("%d ", que.top());
		que.pop();
	}
	printf("\n");
	priority_queue<int, vector<int>, greater<int>> que2;
	que2.push(3);
	que2.push(2);
	que2.push(5);
	que2.push(4);
	que2.push(1);

	while (!que2.empty())
	{
		printf("%d ", que2.top());
		que2.pop();
	}



	
	return 0;
}
